<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
</html>
<script>
    var gender =prompt("请输入性别");
    let rank=3;
    let score=0;
    if(gender==='male' || gender==='female'){
   
    if(rank===1){
        score=6;
    }else if(rank===2){
        score=5;
    }else if(rank===3){
        score=4;
    }else if(rank===4){
        score=3;
    }else if(rank===5){
        score=2;
    }else if(rank===6){
        score=1;
    }else{
        score=0;
        console.log("排名太低，不得分");
    }
    if(rank<=6){
        console.log("恭喜，你在"+gender+"组的第"+rank+"名，获得"+score+"分");
    } 
    }else{
        console.log("请输入有效的性别(male/female)");
    }
</script>